import { Button } from 'antd'
import React from 'react'

const proTableHeaderWrapperAddButton = (clickFn, key, text) => (dom) => {
    const button = React.createElement(Button, {
      size: 'large',
      icon: <i className="iconfont icon-tianjia" />,
      onClick: clickFn,
      type: 'dashed',
      style: { position: 'absolute', top: '0.1rem' },
      // @ts-ignore
      block: 'block',
    }, `${text}`)
    const td = React.createElement('td', {
      style: {
        width: '100%',
        height: '0.4rem',
        display: 'block',
        padding: '0.1rem 0 0 0',
        boxSizing: 'content-box',
      },
    }, button)
    const tr = React.createElement('tr', { key, style: { position: 'relative' } }, td)
    dom.children.push(tr)
    return React.createElement('thead', dom)
  }
export default proTableHeaderWrapperAddButton
